<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title>Click Latency Test</title>
  <script src='http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'
          type='text/javascript'></script>
  <style>
    body { margin: 0; }
    div#main {
      height: 2048px;
    }
  </style>
  <script>
    var is_black = false;
    changeColor = function() {
      $("div#main").css("background-color", is_black ? "white" : "black");
      is_black = !is_black;
    }
    $(document).ready(function() {
      $("div#main").click(changeColor)
    })
  </script>
</head>

<body>
  <div id="main"></div>
</body>

</html>
